import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:sports_new/utils/utils.dart';

import '../../../widgets/circular.dart';
import '../../../widgets/base/qkd_text.dart';

class ChartNotice extends StatelessWidget {
  const ChartNotice({super.key,
    required this.tips,
    this.margin});

  final List<String> tips;
  final EdgeInsets? margin;

  @override
  Widget build(BuildContext context) {
    return tips.isEmpty?Container():Circular(
        color: const Color(0xFFFFF8E0),
        radius: 8,
        margin: margin,
        padding: const EdgeInsets.symmetric(vertical: 6,horizontal: 12),
        child: Column(
          children: tips.map<Widget>((e) => Row(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Container(
                  width: 4,
                  height: 4,
                  margin: const EdgeInsets.symmetric(vertical: 6),
                  alignment: Alignment.centerLeft,
                  decoration:
                  const BoxDecoration(shape: BoxShape.circle, color: Color(0xFFF49200))
              ),
              Container(width: 8),
              Flexible(
                child: QkdText(e.split("").join("\u200A"),
                  color: const Color(0xFFF49200),
                  height: 1.315,
                  maxLines: 2,
                  letterSpacing: -0.8,
                ),
              ),
            ],
          )).toList()
        )
    );
  }
}
